#define _CRT_SECURE_NO_WARNINGS 1
#include"Heap.h"
void test()
{
	Heap s1;
	HeapInit(&s1);
	HeapPush(&s1, 1);
	HeapPush(&s1, 7);
	HeapPush(&s1, 2);
	HeapPush(&s1, 6);
	HeapPush(&s1, 4);
	HeapPush(&s1, 5);
	HeapPush(&s1, 9);
	int i = 0;
	for (i = 0;i < s1.size;i++)
	{
		printf("%d ", s1.a[i]);
	}
	printf("\n");
	HeapPop(&s1);
	HeapPop(&s1);
	for (i = 0;i < s1.size;i++)
	{
		printf("%d ", s1.a[i]);
	}
	printf("\n");
	int top = HeapTop(&s1);
	printf("top=%d\n", top);
	int size = HeapSize(&s1);
	printf("size=%d\n", size);
	if (HeapEmpty(&s1))
	{
		printf("ture");
	}
	else
	{
		printf("false");
	}
	HeapDestroy(&s1);
}
int main()
{
	test();
	return 0;
}